import 'package:flutter/material.dart';

void main() {
  runApp(MyCounterWidget());
}

class MyCounterWidget extends StatefulWidget{


  @override
  State<StatefulWidget> createState(){
    return MyCounterState();
  }
}

class MyCounterState extends State<MyCounterWidget>{
  int counter=0;

@override
  Widget build(BuildContext context){
    return Center(
      child: Text(
        "当前计数：$counter",
        style: TextStyle(fontSize: 30),
        ),
    );
  }
}
